//
//  ViewController.swift
//  test-ios
//
//  Created by wyz5204 on 2023/2/2.
//

import UIKit

class ViewController: UIViewController {
    
    @IBOutlet weak var show: UIImageView!
    @IBOutlet weak var second: UILabel!
    @IBOutlet weak var first: UILabel!
    
    @IBOutlet weak var tfUserName: UITextField!
    override func viewDidLoad() {
        super.viewDidLoad()
        
        let xx = testObject()
        print(xx)
        xx.seyHello()
        
        UserDefaults.standard.set(true, forKey: "login_state")
    }
    
    @IBAction func sureClick(_ sender: UIButton) {
        print("adasd", Date().timeIntervalSince1970)
        show.image = UIImage(named: "test")
    }
    
    @IBAction func openSecond(_ sender: UIButton) {
        
        
        print("open second")
        let a = storyboard?.instantiateViewController(withIdentifier: "second") ?? nil
        guard a != nil else{
            return
        }
        present(a!, animated:true)
    }
    
    @IBAction func showUserName(_ sender: UIButton) {
        guard tfUserName.text?.isEmpty == false else{
            print("用户名不可以为null")
            return
        }
        
    }
    
}

